package com.zzh.takeoutapp.base;

import android.annotation.SuppressLint;
import android.app.Activity;

import com.zzh.takeoutapp.app.MainApp;

import java.lang.ref.WeakReference;

/**
 * @author zzh
 * @Name:
 * @Description:
 * @date
 * @time
 * @copyright
 */
@SuppressLint("InflateParams")
public class AppContext extends MainApp {

    private static AppContext instance;
    private WeakReference<Activity> sCurrentActivityWeakRef;//对活动的activity的弱引用

    //单例模式中获取唯一的ExitApplication实例
    public static AppContext getInstance() {
        if (null == instance) {
            instance = new AppContext();
        }
        return instance;
    }
}
